package snev_cr;

import java.io.*;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

public class TranceptorCodeRecolector {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		int port_sender;
		String rss_file;
		BufferedReader input;
		String CONFIG_PATH = "config/config.txt";
		
		try {
			input =  new BufferedReader(new FileReader(CONFIG_PATH));
			String line = null;
			line = input.readLine();
			port_sender = Integer.parseInt(line);
			line = input.readLine();
			rss_file = new String (line);
			input.close();

		
			BlockingQueue<SeedContainer> queue = new LinkedBlockingQueue<SeedContainer>();
			
			Thread recolector = new Thread(new Recolector(rss_file, queue));
			recolector.start();
			Thread sender = new Thread(new Sender(port_sender, queue));
			sender.start();
			
			System.out.println("tranceptor code iniciado");
			
		} catch (Exception e)	{
			
		}
	
	}

}
